/*
 * SwarmInterface.java
 *
 * Created on May 26, 2007, 10:55 AM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package pso;

/**
 *
 * @author Greg Robinson gregarobi@dev.java.net
 */
public interface SwarmInterface {
    
    //Updates _position then _prevBest and _prevBestFitness then _velocity
    //for every particle
    public void update();
    
    //Runs swarm until better than or equal to fitness
    public double[] search(double fitness);
    
    //Returns the position of all particles in swarm
    public double[][] getPositions();
    
    //Returns the velocity of all particles in swarm
    public double[][] getVelocities();
    
    //Returns the best position of each particle
    public double[][] getBestPositions();
    
    //Returns the swarm's best position
    public double[] getBestPos();
    
    //Returns the swarm's best fitness
    public double[] getBestFit();
    
    //Returns the fitness of a given position
    public double fitness(double[] position);
}
